/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * AgentLabel.java
 *
 * Created on 2011-7-28, 12:09:33
 */
package edu.qmul.ns2.agent;

import edu.qmul.ns2.computer.NodeLabel;
import me.zhy.swing.DragSupport;
import me.zhy.swing.Draggable;

/**
 *
 * @author Administrator
 */
public class AgentLabel extends NodeLabel implements Draggable {

    int ID = 0;

    /**
     * @return the ID
     */
    public int getID() {
        return ID;
    }

    /**
     * @param aID the ID to set
     */
    public void setID(int aID) {
        ID = aID;
    }

    /** Creates new form AgentLabel */
    public AgentLabel() {
        initComponents();
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        setText("null");
    }// </editor-fold>//GEN-END:initComponents
    private boolean draggable;

    @Override
    public void setDraggable(boolean draggable) {
        this.draggable = draggable;
        if (draggable) {
            DragSupport.startDrag(this);
        } else {
            DragSupport.stopDrag(this);
        }
    }

    @Override
    public boolean isDraggable() {
        return draggable;
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    // End of variables declaration//GEN-END:variables
}
